class MilestoneMailer < ActionMailer::Base
  def reminder_email(milestone)
    recipients milestone.project.users.collect {|u| u.email}
    subject "#{milestone} está prestes a vencer o prazo limite de conclusão"
    body :milestone => milestone
    sent_on Time.now
    
    milestone.update_attribute :reminder_sent, true
  end
end